package com.qcit.business

import com.qcit.base.BaseApplication
import com.qcit.common.data.AppDatabase
import com.qcit.common.utils.QSharedPreferences
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch

//@HiltAndroidApp
class MainApplication : BaseApplication(){
    override fun onCreate() {
        super.onCreate()
        QSharedPreferences.init(this)
        initDB()
    }

    private fun initDB() {
        GlobalScope.launch(Dispatchers.IO) {
            AppDatabase.getInstance(this@MainApplication)
        }
    }
}